Use g_win32_get_windows_version() instead of _winver so that this compiles
authorTor Lillqvist <tml@novell.com>
Thu, 14 Jun 2007 09:41:08 +0000 (09:41 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Thu, 14 Jun 2007 09:41:08 +0000 (09:41 +0000)
2007-06-14  Tor Lillqvist  <tml@novell.com>

* gdk/win32/gdkwindow-win32.c (RegisterGdkClass): Use
g_win32_get_windows_version() instead of _winver so that this
compiles on Cygwin, too. Not that I know if it makes sense to
build GTK+ with the Win32 backend for Cygwin, but some people want
to.

svn path=/trunk/; revision=18132

ChangeLog
gdk/win32/gdkwindow-win32.c

index d7ab28f78e9540bf62e04c6fe80fbc7e31421e37..2f536ebe10f066bb662f7f71e6f039e32ca1a8cd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2007-06-14  Tor Lillqvist  <tml@novell.com>
+
+       * gdk/win32/gdkwindow-win32.c (RegisterGdkClass): Use
+       g_win32_get_windows_version() instead of _winver so that this
+       compiles on Cygwin, too. Not that I know if it makes sense to
+       build GTK+ with the Win32 backend for Cygwin, but some people want
+       to.
+
 2007-06-13  Matthias Clasen  <mclasen@redhat.com>
 
        * NEWS: Updates
index fad5644a3b6d2dc7ff01cf057959f0e589d52198..ae0b7314d8657d6fd8f4ecd1e8e3ee4abb324f1f 100644 (file)
@@ -422,8 +422,12 @@ RegisterGdkClass (GdkWindowType wtype, GdkWindowTypeHint wtype_hint)
             {
               wcl.lpszClassName = "gdkWindowTempShadow";
               wcl.style |= CS_SAVEBITS;
-              if (_winver >= 0x0501) /* Windows XP (5.1) or above */
-                wcl.style |= 0x00020000; /* CS_DROPSHADOW */
+              if (LOBYTE (g_win32_get_windows_version()) > 0x05 ||
+                 LOWORD (g_win32_get_windows_version()) == 0x0105)
+               {
+                 /* Windows XP (5.1) or above */
+                 wcl.style |= 0x00020000; /* CS_DROPSHADOW */
+               }
               ONCE_PER_CLASS ();
               klassTEMPSHADOW = RegisterClassEx (&wcl);
             }